const {getBookHttp} = require("../../models/http")
const {transformStar} = require("../../utils/index")
Page({
  data: {
    lists:[]
  },
  onLoad:async function (options) {
    var res = await getBookHttp()
    var lists = res.data
    lists.forEach(item=>{
      item.pic = item.coverImage
      item.raiting = item.rating
      item.star = transformStar(item.raiting)
    })
    this.setData({
      lists
    })
  }
})